#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)
#include<stdio.h>
void FindNum(int arr[], int n, int* pnum1, int* pnum2)
{
	int x = 0;
	int i = 0;
	int k = 0;
	for (i = 0; i < 10; i++)
	{
		x ^= arr[i];
	}
	*pnum1 = *pnum2 = 0;
	for (i = 0; i < 32; i++)
	{
		if ((x >> i & 1) == 1)
		{
			k = i;
			break;
		}
	}
	for (i = 0; i < n; i++)
	{
		if (((arr[i] >> k) & 1) != 0)
		{
			*pnum1 ^= arr[i];
		}
		else
			*pnum2 ^= arr[i];
	}
	
}


int main()
{
	int arr[] = { 1, 2, 3, 4, 5, 1, 2, 3, 4, 6 };
	int n = 0;
	int num1 = 0, num2 = 0;
	n = sizeof(arr) / sizeof(arr[0]);
	FindNum(arr, n, num1, num2);
	printf("%d %d", num1, num2);
}